<?php include_once($theme."/html/header.phtml");?>

	<div id="content" class="narrowcolumn">

	<?php if (count($blogposts)>0){ ?>

		<?php foreach($blogposts as $blogpost){ ?>

			<div class="post" id="post-<?php echo $blogpost->id; ?>">
				<h2><a href="/blog/<?php echo $blogpost->id; ?>/<?php echo URLHelper::clean($blogpost->title); ?>/" rel="bookmark" title="Permanent Link to <?php echo $blogpost->title; ?>"><?php echo $blogpost->title; ?></a></h2>
				<small><?php echo DateFormatHelper::RFC822($blogpost->created); ?> by <?php echo $blogpost->author; ?></small>

				<div class="entry">
					<?php echo nl2br($blogpost->body); ?>
				</div>
				<p class="postmetadata">Tags:
				<?php foreach(explode(",",$blogpost->tags) as $tag){ ?>
				<a href="/blog/tag/?s=<?php echo trim($tag); ?>" rel="tag"><?php echo trim($tag); ?></a>
				<?php } ?>
				</p>
			</div>

		<?php } ?>

	<?php } else { ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>

	<?php } ?>
	
	</div>

<?php include_once($theme."/html/sidebar.phtml");?>

<?php include_once($theme."/html/footer.phtml");?>
